import React from "react";
import { createBottomTabNavigator } from "react-navigation";
import Icon from 'react-native-vector-icons/FontAwesome'
import User from '../Pages/person/index'
import HomeScreen from '../Pages/home'

const AppNavigator = createBottomTabNavigator(
  {
    Home: {
      screen : HomeScreen
    },
    User
  },
  {
    initialRouteName: "Home",
    defaultNavigationOptions: ({ navigation }) => ({
      tabBarIcon: () => {
        const { routeName } = navigation.state
        let name = 'github'
        if (routeName === 'User') {
          name = 'user'
        }
        return <Icon name={name} size={30} color="#900"/>
      }
    })
  }
)

export default AppNavigator